
using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
using GruntXProductions;
using Viper;
using Viper.Opcodes;

namespace Diamond
{
	public partial class Parser
	{
		private int index = 0;
		private bool checkForEOL = true;
		public List<SyntaxNode> AST = new List<SyntaxNode> ();
		public List<Token> tokens = new List<Token>();
		public Parser (List<Token> tok)
		{
        	tokens = tok;
		}
		private Token readToken ()
		{
        	++index;
        	return tokens [index - 1];
		}
		private Token peekToken (int depth = 0)
		{
			if (depth + index >= tokens.Count)
				return new Tokens.Statement ();
        	return tokens [depth + index];
		}
	}
}

